package com.tuton.javanet.chapter03;

import java.net.Socket;

public class Client {

	private static int lenght = 100;
	private static int port = 8000;
	private static String host = "localhost";
	
	public static void main(String[] args) throws Exception {
		Socket[] sockets = new Socket[lenght];
		for(int i = 0; i < lenght; i++) {
			sockets[i] = new Socket(host,port);
			System.out.println("Number " + i+1 + " times for connected successfully...");
			
		}
		Thread.sleep(3000);
		for(int i = 0 ; i < lenght; i++) {
			sockets[i].close();
		}
		
	}

}
